package com.malljelly.study.controller;

import com.alibaba.fastjson.JSONObject;
import com.malljelly.study.service.OrderService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by 骑着蜗牛去旅行 on 2018/9/3.
 */

@Api("订单接口文档")
@RestController  //@Controller+@ResponseBody
@RequestMapping("soa/orderService")
@Slf4j
public class OrderController {

    @Autowired
    private OrderService orderService;

    @GetMapping("/updateOrder")
    JSONObject updateOrder(@RequestParam("isPay") Long isPay, @RequestParam("payId") String aliPayId,
                           @RequestParam("orderNumber") String orderNumber) {
        return orderService.updateOrderId(isPay, aliPayId, orderNumber);
    }
}
